import 'package:flutter/material.dart';
import 'package:flutter_deer/index/iview/banner_detail_iview.dart';
import 'package:flutter_deer/index/models/banner_entity.dart';
import 'package:flutter_deer/mvp/base_page_presenter.dart';
import 'package:flutter_deer/net/base_entity.dart';
import 'package:flutter_deer/net/net.dart';
import 'package:flutter_deer/util/other_utils.dart';


class BannerDetailPagePresenter extends BasePagePresenter<BannerDetailIMvpView> {

  @override
  void initState() {
  }

  Future<dynamic> getBannerDetail(String? id) async {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      asyncRequestNetwork<BaseEntity<FocusMapDetailEntity>>(Method.get,
          url: HttpApi.getFocusMapDetail.replaceAll('{id}', id.nullSafe),
          onSuccess: (data) {
            view.setBannerDetail(data?.data);
          },
          onError: (code,msg){

          }
      );
    });
  }

}